<?php

include_once("../service/introductionService.php");


$intIDs = $_POST['checkbox'];
$intID = $_GET['insid'];

if (isset($intIDs)) {
    if (!empty($intIDs)) {
        foreach ($intIDs as $id) {
            deleteIntroduction($id);
        }
        Header("Location: ../admin-page/introduction.php?message=ok");
    }
    return;
} else if (isset($intID)) {
    deleteIntroduction($intID);
    Header("Location: ../admin-page/introduction.php?message=ok");
    return;
} else {
    Header("Location: ../admin-page/introduction.php");
}
?>